from multiprocessing import Process
import os,time
def test():
    print(f'我是子进程，我的PIP{os.getpid()}，我的父进程{os.getpid()}')
    time.sleep(1)
if __name__=='__main__':
    print('主进程开始执行')
    lst=[]
    for i in range(5):
        p = Process(target=test)
        p.start()
        lst.append(p)
    for item in lst:
        item.join()
    print('主进程结束')